/*
 * Created by JFormDesigner on Wed Jun 26 20:53:08 CST 2024
 */

package scct.ZhuZhouXing.ui;

import com.sun.org.apache.bcel.internal.generic.BREAKPOINT;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/**
 * @author xzy
 */
public class MainFrom extends JFrame {
    public MainFrom() {
        initComponents();
    }

    private void btnworker(ActionEvent e) {

    }

    private void btncmm(ActionEvent e) {
       PaneMembersManager paneMembersManager = new PaneMembersManager(this);
        paneLMain.removeAll();
        paneLMain.add(paneMembersManager,BorderLayout.CENTER);
        validate();
    }

    private void menpage(ActionEvent e) {
//        MainFrom mainFrom =new MainFrom();
//        paneLMain.removeAll();
//        paneLMain.
        //跳转首页

    }

    private void menquit(ActionEvent e) {
        this.dispose();//退出关闭窗口
    }

    private void btnmember(ActionEvent e) {
        PaneMembersManager paneMembersManager=new PaneMembersManager(this);
        paneLMain.removeAll();
        paneLMain.add(paneMembersManager,BorderLayout.CENTER);
        validate();
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        // Generated using JFormDesigner Evaluation license - 周文成
        menuBar1 = new JMenuBar();
        menu1 = new JMenu();
        menpage = new JMenuItem();
        menquit = new JMenuItem();
        menu4 = new JMenu();
        menuItem2 = new JMenuItem();
        menuItem3 = new JMenuItem();
        menuItem4 = new JMenuItem();
        menu8 = new JMenu();
        menuItem5 = new JMenuItem();
        menuItem6 = new JMenuItem();
        pane = new JPanel();
        toolBar1 = new JToolBar();
        btnworker = new JButton();
        btnmember = new JButton();
        btncmm = new JButton();
        paneLMain = new JPanel();

        //======== this ========
        setTitle("\u8d85\u5e02\u7ba1\u7406\u7cfb\u7edf");
        Container contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());

        //======== menuBar1 ========
        {

            //======== menu1 ========
            {
                menu1.setText("\u7cfb\u7edf");

                //---- menpage ----
                menpage.setText("\u9996\u9875");
                menpage.addActionListener(e -> menpage(e));
                menu1.add(menpage);

                //---- menquit ----
                menquit.setText("\u9000\u51fa");
                menquit.addActionListener(e -> menquit(e));
                menu1.add(menquit);
            }
            menuBar1.add(menu1);

            //======== menu4 ========
            {
                menu4.setText("\u7ba1\u7406");

                //---- menuItem2 ----
                menuItem2.setText("\u5546\u54c1\u7ba1\u7406");
                menu4.add(menuItem2);

                //---- menuItem3 ----
                menuItem3.setText("\u5458\u5de5\u7ba1\u7406");
                menu4.add(menuItem3);

                //---- menuItem4 ----
                menuItem4.setText("\u4f1a\u5458\u7ba1\u7406");
                menu4.add(menuItem4);
            }
            menuBar1.add(menu4);

            //======== menu8 ========
            {
                menu8.setText("\u5173\u4e8e");

                //---- menuItem5 ----
                menuItem5.setText("\u5173\u4e8e\u6211\u4eec");
                menu8.add(menuItem5);

                //---- menuItem6 ----
                menuItem6.setText("\u9690\u79c1\u4e0e\u4fdd\u62a4\u534f\u8bae");
                menu8.add(menuItem6);
            }
            menuBar1.add(menu8);
        }
        setJMenuBar(menuBar1);

        //======== pane ========
        {
            pane.setBorder (new javax. swing. border. CompoundBorder( new javax .swing .border .TitledBorder (new javax. swing
            . border. EmptyBorder( 0, 0, 0, 0) , "JF\u006frmDes\u0069gner \u0045valua\u0074ion", javax. swing. border. TitledBorder
            . CENTER, javax. swing. border. TitledBorder. BOTTOM, new java .awt .Font ("D\u0069alog" ,java .
            awt .Font .BOLD ,12 ), java. awt. Color. red) ,pane. getBorder( )) )
            ; pane. addPropertyChangeListener (new java. beans. PropertyChangeListener( ){ @Override public void propertyChange (java .beans .PropertyChangeEvent e
            ) {if ("\u0062order" .equals (e .getPropertyName () )) throw new RuntimeException( ); }} )
            ;
            pane.setLayout(new BorderLayout());

            //======== toolBar1 ========
            {
                toolBar1.setFloatable(false);

                //---- btnworker ----
                btnworker.setToolTipText("\u5458\u5de5\u7ba1\u7406");
                btnworker.setIcon(new ImageIcon(getClass().getResource("/icon/\u5458\u5de5.png")));
                btnworker.addActionListener(e -> btnworker(e));
                toolBar1.add(btnworker);

                //---- btnmember ----
                btnmember.setToolTipText("\u4f1a\u5458\u7ba1\u7406");
                btnmember.setIcon(new ImageIcon(getClass().getResource("/icon/\u4f1a\u5458.png")));
                btnmember.addActionListener(e -> btnmember(e));
                toolBar1.add(btnmember);

                //---- btncmm ----
                btncmm.setToolTipText("\u5546\u54c1\u7ba1\u7406");
                btncmm.setIcon(new ImageIcon(getClass().getResource("/icon/\u5546\u54c1.png")));
                toolBar1.add(btncmm);
            }
            pane.add(toolBar1, BorderLayout.NORTH);

            //======== paneLMain ========
            {
                paneLMain.setLayout(new BorderLayout());
            }
            pane.add(paneLMain, BorderLayout.CENTER);
        }
        contentPane.add(pane, BorderLayout.CENTER);
        setSize(840, 625);
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    // Generated using JFormDesigner Evaluation license - 周文成
    private JMenuBar menuBar1;
    private JMenu menu1;
    private JMenuItem menpage;
    private JMenuItem menquit;
    private JMenu menu4;
    private JMenuItem menuItem2;
    private JMenuItem menuItem3;
    private JMenuItem menuItem4;
    private JMenu menu8;
    private JMenuItem menuItem5;
    private JMenuItem menuItem6;
    private JPanel pane;
    private JToolBar toolBar1;
    private JButton btnworker;
    private JButton btnmember;
    private JButton btncmm;
    private JPanel paneLMain;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
